package main.java.tmi.returnProduct.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import main.java.tmi.common.service.impl.AbstractDao;
import main.java.tmi.returnProduct.service.ReturnProductVO;

import org.springframework.stereotype.Repository;

/**
 * ReturnProduct Data Access Object (cust Table)
 *
 * @author min™
 * @since 2012. 04. 24
 */
@Repository
public class ReturnProductDAO extends AbstractDao {
	
	/**
	 * ReturnProductDetail search
	 * @return List<ReturnProductVO>
	 * @throws SQLException 
	 */
	@SuppressWarnings("unchecked")
	public List<ReturnProductVO>  getReturnProductDetailView(Map<String,String> param) throws SQLException {

        return (List<ReturnProductVO>) list("ReturnProductDAO.getReturnProductDetailView", param);
	}
	
	/**
	 * ReturnProductDetail search
	 * @return List<ReturnProductVO>
	 * @throws SQLException 
	 */
	@SuppressWarnings("unchecked")
	public String  getDetailSeq(Map<String,String> param) throws SQLException {
		System.out.println("===========>ReturnProductDAO : getDetailSeq");
		String returnNo = selectByPk("ReturnProductDAO.getDetailSeq", param).toString(); 
        return returnNo;
	}
		/**
	 * ReturnProductDetail save
	 * @return void
	 * @throws SQLException 
	 */
	public void addReturnProductDetail(Map<String,String> param) throws SQLException {
		insert("ReturnProductDAO.addReturnProductDetail", param);
	}
	
	/**
	 * ReturnProductDetail modify
	 * @return void
	 * @throws SQLException 
	 */
	public void modifyReturnProductDetail(Map<String,String> param) throws SQLException {
		insert("ReturnProductDAO.modifyReturnProductDetail", param);
	}
	
	/**
	 * ReturnProductDetail del
	 * @return void
	 * @throws SQLException 
	 */
	public void delReturnProductDetail(Map<String,String> param) throws SQLException {
		insert("ReturnProductDAO.delReturnProductDetail", param);
	}
}
